package cn.dapeng.designPatterns.chain.t03;

public class TestCase {

    public static void main(String[] args) {
        Msg msg = new Msg();
        msg.setMsg("大家好:), <script>, 欢迎访问mashibing.com，大家都是996");

        FilterChain fc = new FilterChain();
        fc.addFilter(new HtmlFilter()).addFilter(new SensitiveFilter());

        FilterChain fc1 = new FilterChain();
        fc1.addFilter(new FaceFilter()).addFilter(new UrlFilter());

        fc.addFilter(fc1);

        fc.doFilter(msg);

        System.out.println(msg.getMsg());
    }
}
